package com.basin.common.glc.event;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.stereotype.Component;

/**
 * @author: Sam ZHONG | sammy1997@aliyun.com
 * @date: 2025/6/21 22:09
 * @description:
 */
@Component
@Slf4j
@EnableAsync
public class BasinLogEventListener {

    @EventListener(BasinLogEvent.class)
    @Async
    public void handle(BasinLogEvent event) {
        log.info("accept event: {}", event.getLogInfoJsonString());
    }
}
